package com.alpha.tables;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the project database table.
 * 
 */
@Embeddable
public class ProjectPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	private int idproject;

	@Column(name="manager_idemployee")
	private int managerIdemployee;

    public ProjectPK() {
    }
	public int getIdproject() {
		return this.idproject;
	}
	public void setIdproject(int idproject) {
		this.idproject = idproject;
	}
	public int getManagerIdemployee() {
		return this.managerIdemployee;
	}
	public void setManagerIdemployee(int managerIdemployee) {
		this.managerIdemployee = managerIdemployee;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof ProjectPK)) {
			return false;
		}
		ProjectPK castOther = (ProjectPK)other;
		return 
			(this.idproject == castOther.idproject)
			&& (this.managerIdemployee == castOther.managerIdemployee);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.idproject;
		hash = hash * prime + this.managerIdemployee;
		
		return hash;
    }
}